package com.xm.servlet.reception_desk.pay;

import com.xm.service.reception_desk.OrdersService;
import lombok.SneakyThrows;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 修改订单状态
 * @author 康文程
 * @date 2024-1-9 上午 11:28
 */
@WebServlet("/modify/order/status")
public class ModifyOrderStatusServlet extends HttpServlet {
    /**
     * 订单Service
     */
    private final OrdersService service = new OrdersService();

    @SneakyThrows
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        service.updateOrderStatusByOrderId(req.getParameter("orderId"),3);
    }
}
